package com.colladaviewer.ardetector;


import com.jme3.renderer.Camera;
import com.jme3.system.JmeSystem;
import com.colladaviewer.app.R;

import jp.nyatla.nyartoolkit.NyARException;
import jp.nyatla.nyartoolkit.core.param.NyARParam;



/**
 * <code>ARCam</code> sets the projection to be used for 2D to 3D calculation. 
 * Gets initialized from the JME3 camera.
 * 
 * @author as
 *
 */
public class ARCam extends NyARParam
{

    public ARCam() throws NyARException
    {
        // TODO remove hardcoded params
        //loadARParamFromFile("/home/as/workspace/ColladaViewer/res/raw/camera_para.dat");
        try
        {
            loadARParam(JmeSystem.getResources().openRawResource(R.raw.camera_para));
        }
        catch (NoSuchMethodError e)
        {
            loadARParamFromFile("/home/as/workspace/ColladaViewer/res/raw/camera_para.dat");
        }
        //setProjection(fromJmeCam.getProjectionMatrix());
        //this.makeCameraFrustumRH(fromJmeCam.getFrustumNear(), fromJmeCam.getFrustumFar(),getPerspectiveProjectionMatrix());
       
    }
}
